#include "listener.hh"

Listener::Listener (Server* s):
  s_ (s)
{
  t_ = boost::thread (&Listener::start, this);
}

void
Listener::start ()
{
  while (true)
  {
    tcp::socket* sock = new tcp::socket (s_->ios ());
    s_->acc ().accept (*sock);

    Client* c = new Client (sock, s_->database (), s_->gt ());
    (void) c;
  }
}
